# your_app/templatetags/math_filters.py
from django import template

register = template.Library()

@register.filter
def saving_percent(discount_rate):
    return (1 - float(discount_rate)) * 100